package com.brayan.webapp.controller.general.country;

import java.util.List;

import javax.enterprise.context.RequestScoped;
import javax.inject.Inject;
import javax.inject.Named;

import com.brayan.webapp.model.general.country.Country;
import com.brayan.webapp.repository.general.country.CountryRepository;

@Named
@RequestScoped
public class CountryController {
	
	@Inject
	private CountryRepository countryRepo;
	
	/**
	 * Return all countries.
	 * @return
	 */
	public List<Country> getAllCountries(){
		return countryRepo.getAllCountriesOrderedByPriority();
	}
}
